Skip to main content

Q-1: MCQ/Short Question/Fill in the Blanks (Any Five) - Section I (5 Marks)

Questions​

i) What is the purpose of the Android Manifest file?
ii) What type of OS is Android?
iii) What does a TextView display?
iv) How do you combine multiple layouts?
v) How can dates be displayed?
vi) What is the Toolbar for?
vii) What is the purpose of the Android Support Library?


Answers​

i) Purpose of the Android Manifest file​

The Android Manifest file (AndroidManifest.xml) serves several critical purposes:

  • Application Declaration: Declares the application and its components (activities, services, broadcast receivers, content providers)
  • Permissions: Specifies the permissions that the application requires
  • API Level: Defines the minimum and target API levels
  • Hardware Requirements: Declares hardware and software features used by the app
  • Application Configuration: Contains metadata about the application like name, icon, theme

ii) Type of OS Android is​

Android is a Linux-based mobile operating system that is:

  • Open source
  • Based on Linux kernel
  • Designed primarily for touchscreen mobile devices
  • Uses a modified version of the Linux kernel
  • Stack-based architecture with multiple layers

iii) What TextView displays​

TextView is a UI component that displays:

  • Text content to the user
  • Static or dynamic text
  • Formatted text with different styles, colors, and sizes
  • Can display plain text, HTML formatted text, or spannable text
  • Non-editable text (read-only)

iv) How to combine multiple layouts​

Multiple layouts can be combined by:

  • Nesting layouts: Placing one layout inside another
  • Using ViewGroup containers: LinearLayout, RelativeLayout, ConstraintLayout
  • Layout inflation: Programmatically combining layouts
  • Include tag: Reusing layout XML files
  • Fragment composition: Using fragments with different layouts

v) How dates can be displayed​

Dates can be displayed using:

  • TextView: Simple text display of formatted dates
  • DatePicker: Interactive date selection widget
  • TimePicker: For time selection
  • Calendar View: Full calendar display
  • Custom formatting: Using SimpleDateFormat class
  • System date/time: Accessing device's current date/time

vi) Purpose of the Toolbar​

The Toolbar serves as:

  • Action Bar replacement: Modern alternative to ActionBar
  • Navigation: Houses navigation controls and menu items
  • Branding: Displays app title, logo, and branding elements
  • Actions: Contains action buttons and overflow menu
  • Customization: Highly customizable appearance and behavior
  • Material Design: Follows Material Design guidelines

vii) Purpose of Android Support Library​

The Android Support Library provides:

  • Backward compatibility: Support for newer Android features on older versions
  • UI components: Additional UI widgets and components
  • API consistency: Consistent behavior across different Android versions
  • Fragment support: Fragment implementation for older Android versions
  • Material Design: Material Design components and themes
  • Utility classes: Helper classes for common tasks

Note: The Support Library has been superseded by AndroidX libraries.